/*****************************************************************************
 *
 * Copyright (c), 2004-2020,ShangHai Neotune Information Technology Co., Ltd.
 *
 * Module Name : cmn_init.h
 *
 * Author :    sean
 *
 * Date :    2004-02-05
 *
 * Version :    1.00
 *
 * Description :    
 *
 * Other :    
 *
 * Data Structure List: <Main Data Structure>
 *
 * Modification History
 * ---------------------------------------------------------------------------
 *  1: Data :      2004-02-05
 *    Author :     sean
 *    Version :    V100R001M00
 *    Modification : creation
 *
*****************************************************************************/


#ifndef EPILOGUE_INSTALL_H
#include <install.h>
#endif

extern void etc_common_init(void);      /* init the common library */

/*
 * The purpose of the following incantations is to make sure that exactly
 * one Epilogue product initializes the common library.  The decision of
 * which product should do the initialization is made at compile time,
 * according to the following if/else-if/else chain.   The intent is to
 * keep all of the control of how this happens localized in one place.
 */

#if     defined(INSTALL_ATTACHE) && INSTALL_ATTACHE
#define COMMON_INIT_FROM_ATTACHE()      etc_common_init()
#elif   defined(INSTALL_ENVOY)   && INSTALL_ENVOY
#define COMMON_INIT_FROM_ENVOY()        etc_common_init()
#elif   defined(INSTALL_COURIER) && INSTALL_COURIER
#define COMMON_INIT_FROM_COURIER()      etc_common_init()
#elif   defined(INSTALL_DECORUM) && INSTALL_DECORUM
#define COMMON_INIT_FROM_DECORUM()      etc_common_init()
#elif   defined(INSTALL_LIAISON) && INSTALL_LIAISON
#define COMMON_INIT_FROM_LIAISON()      etc_common_init()
#elif   defined(INSTALL_EMISSARY) && INSTALL_EMISSARY
/* We don't care in this case... */
#else
#SNMP_ERROR  Internal SNMP_ERROR! Nobody calls etc_common_init()!
#endif

#ifndef COMMON_INIT_FROM_ATTACHE
#define COMMON_INIT_FROM_ATTACHE()
#endif

#ifndef COMMON_INIT_FROM_ENVOY
#define COMMON_INIT_FROM_ENVOY()
#endif

#ifndef COMMON_INIT_FROM_COURIER
#define COMMON_INIT_FROM_COURIER()
#endif

#ifndef COMMON_INIT_FROM_DECORUM
#define COMMON_INIT_FROM_DECORUM()
#endif

#ifndef COMMON_INIT_FROM_LIAISON
#define COMMON_INIT_FROM_LIAISON()
#endif


